package com.muyu.danmo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.danmo.mapper.DanmoCityMapper;
import com.muyu.danmo.domain.DanmoCity;
import com.muyu.danmo.service.IDanmoCityService;

/**
 * 城市Service业务层处理
 * 
 * @author yangle
 * @date 2024-09-20
 */
@Service
public class DanmoCityServiceImpl implements IDanmoCityService 
{
    @Autowired
    private DanmoCityMapper danmoCityMapper;

    /**
     * 查询城市
     * 
     * @param id 城市主键
     * @return 城市
     */
    @Override
    public DanmoCity selectDanmoCityById(Long id)
    {
        return danmoCityMapper.selectDanmoCityById(id);
    }

    /**
     * 查询城市列表
     * 
     * @param danmoCity 城市
     * @return 城市
     */
    @Override
    public List<DanmoCity> selectDanmoCityList(DanmoCity danmoCity)
    {
        return danmoCityMapper.selectDanmoCityList(danmoCity);
    }

    /**
     * 新增城市
     * 
     * @param danmoCity 城市
     * @return 结果
     */
    @Override
    public int insertDanmoCity(DanmoCity danmoCity)
    {
        return danmoCityMapper.insertDanmoCity(danmoCity);
    }

    /**
     * 修改城市
     * 
     * @param danmoCity 城市
     * @return 结果
     */
    @Override
    public int updateDanmoCity(DanmoCity danmoCity)
    {
        return danmoCityMapper.updateDanmoCity(danmoCity);
    }

    /**
     * 批量删除城市
     * 
     * @param ids 需要删除的城市主键
     * @return 结果
     */
    @Override
    public int deleteDanmoCityByIds(Long[] ids)
    {
        return danmoCityMapper.deleteDanmoCityByIds(ids);
    }

    /**
     * 删除城市信息
     * 
     * @param id 城市主键
     * @return 结果
     */
    @Override
    public int deleteDanmoCityById(Long id)
    {
        return danmoCityMapper.deleteDanmoCityById(id);
    }
}
